package com.hwadee.ems.domain.po;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hwadee.ems.enums.DayOfWeek;
import com.hwadee.ems.enums.Session;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;


/**
 * <p>
 * 教室借用申请
 * </p>
 *
 * @author EnosElinsa
 * @since 2024/06/21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("classroom_application")
public class ClassroomApplication implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 申请教室编号 references classroom(id) for (name)
     */
    private Long classroomId;

    /**
     * 申请人编号 references user(id) for (name)
     */
    private Long applicantId;

    /**
     * 申请学期编号 references semester(id) for (name)
     */
    private Long semesterId;

    /**
     * 审批编号 references approval(id) for (status, opinion, approval_date)
     */
    private Long approvalId;

    /**
     * 申请周次
     */
    private Integer week;

    /**
     *  申请星期几，0代表星期日，1代表星期一，2代表星期二，3代表星期三，4代表星期四，5代表星期5，6代表星期6
     */
    private DayOfWeek dayOfWeek;

    /**
     * 申请节次，0代表1-2，1代表3-5，2代表6-7，3代表8-9，4代表10-12，5代表13-15
     */
    private Session session;

    /**
     * 申请原因
     */
    private String reason;

    /**
     * 申请填报日期
     */
    private LocalDate applicationDate;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

    /**
     * 逻辑删除标识
     */
    @TableLogic
    private Boolean isDeleted;

}
